In Dart, we use constructors to provide an initialization logic for a new object creation. Sometimes we don’t need any additional logic, so the
constructor is left empty. In such cases, the constructor body can be simply removed and the declaration must be terminated with a semicolon.
Noncompliant code example
class Person {
String name;
int age;
Person(this.name, this.age) {}
}
Compliant solution
class Person {
String name;
int age;
Person(this.name, this.age);
}